package com.ftg.youx.tools;

/**
 * 描述     状态码
 *
 * @author 布衣
 * @date 2024/10/23
 */
public enum S {

    SUCCESS(200,"操作成功"),
    ERROR(500,"操作失败"),
    UNKNOWN_ERROR(500,"未知错误"),
    PARAM_ERROR(400,"参数错误"),
    NOT_FOUND(404,"未找到"),
    NOT_LOGIN(401,"未登录"),
    NOT_AUTHORIZED(403,"未授权"),
    NOT_SUPPORT(405,"不支持"),
    NOT_IMPLEMENTED(501,"未实现"),
    NOT_ACCEPTABLE(406,"不可接受"),
    SENTINEL_BLOCK(429,"当前操作被限流"),
    NOT_ACCEPTABLE_CONTENT(406,"不可接受内容");

    private Integer code;

    private String msg;

    private S(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
